#ifndef __socket_h_
#define __socket_h_ 1
#include "net.h"

#define socket_stream_new()     socket_new(AF_INET, SOCK_STREAM, 0)
#define socket_dgram_new()     socket_new(AF_INET, SOCK_DGRAM, 0)
#define socket_packet_new()     socket_new(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))

extern int socket_new(int family, int type, int flag);
#endif